<?

session_start();
REQUIRE ("../../../include/protect/connect.php");             //Pour se connecter a la base.
REQUIRE ("../../../include/fonction.php");             //Pour les fonction PHP


$PAGE="<SCRIPT TYPE=\"text/javascript\" SRC=\"../../../include/common_script.js\"></SCRIPT>";



//PAge qui sert a modifier la page des modifications d'articles.
echo $article;




$_ID=$article;
 SESSION_REGISTER("_ID");

$QUERY="SELECT client_name,client_mail,client_adresse,client_cp,client_localite,client_pays,
client_tva,client_numerot, client_fax,client_numerog,client_mail,client_manager, client_lien,
client_nagent,client_login,client_pass,client_manager FROM agent WHERE client_id=$article";
$resultat=mysql_query($QUERY);
$tmp=mysql_fetch_array($resultat);

$tmp[1]=addslashes($tmp[1]);
$tmp[0]=addslashes($tmp[0]);

$ptvac=$tmp[2]*($tmp[3]/100)+$tmp[2];

$PAGE.="<script language=\"javascript\">
           parent.document.form_article.nom.value='$tmp[0]';
           parent.document.form_article.mail.value='$tmp[1]';
           parent.document.form_article.adresse.value='$tmp[2]';
           parent.document.form_article.cp.value='$tmp[3]';
           parent.document.form_article.ville.value='$tmp[4]';
           parent.document.form_article.land.value='$tmp[5]';
           parent.document.form_article.tva.value='$tmp[6]';
           parent.document.form_article.phone.value='$tmp[7]';
           parent.document.form_article.fax.value='$tmp[8]';
           parent.document.form_article.gsm.value='$tmp[9]';
           parent.document.form_article.mail.value='$tmp[10]';
           parent.document.form_article.client.value='$tmp[12]';
           parent.document.form_article.nagent.value='$tmp[13]';
           parent.document.form_article.login.value='$tmp[14]';
           parent.document.form_article.article.value=$article;
             parent.document.form_article.droit.value='$tmp[16]';

</script> ";
mysql_close(); ECHO $PAGE;  EXIT;
       
?>
